import store from '@/store/index.js'
export default function() {
	let token = uni.getStorageSync('token');
	return new Promise((resolve, reject) => {
		if (token) {
			//  理解为登陆状态 
			store.dispatch('users/getUserInfo').then(() => {
			    resolve(0)
			}).catch(err=>{
				resolve(1)
			})
		} else {
			    resolve(1)
		}
	})
}